package com.yugao.fintech.antelope.gateway.sign;

import com.yugao.fintech.antelope.gateway.sign.model.SignModeEnum;
import lombok.Data;

import java.util.*;

@Data
public class SignProperties {
    /**
     * 签名模式
     */
    private SignModeEnum mode = SignModeEnum.RQ;

    private List<ConfigSign> config = Collections.emptyList();

    @Data
    public static class ConfigSign {
        private String id;

        /**
         * 被排除的url
         */
        private Set<String> excludeUrls = new HashSet<>();
        /**
         * 包含的url
         */
        private Set<String> includeUrls = new HashSet<>();

        /**
         * 只对包含的路径添加请求头
         */
        private List<String> addRequestHeader = new ArrayList<>();
    }
}
